<template>
    <div>
      <el-button type="primary" round  @click="add()">添加</el-button>
          <v-list @dit="dit"></v-list>
          <v-add :obj="obj" ref="aa"></v-add>
    </div>
</template>
<script>
import vList from './components/list.vue'
import  vAdd from './components/add.vue'
export default {
    props:[],
    data() {
        return {
            obj:{
                //标识add显示与隐藏
                isTrue:false,
                idAdd:false
            }
        }
    },
    methods:{
        add(){
            this.obj.isTrue=true
            this.obj.isAdd=true
        },
        dit(id){
            this.obj.isTrue=true,
            this.obj.isAdd=false
            this.$refs.aa.getone(id)
        }
    },
  components:{
    vList,
    vAdd,
  }
};
</script>

<style>


</style>

